package com.example.backend.controller;


import com.example.backend.common.ResultMessage;
import com.example.backend.entity.vo.Ddmx;
import com.example.backend.entity.vo.Wdia;
import com.example.backend.service.WorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/worksj")
public class WorkSJ {
    @Autowired
    WorkService workService;

    @PostMapping("/query/{yhid}")
    public ResultMessage query(@PathVariable Integer yhid) {
        Wdia wdia = workService.query(yhid);
        return ResultMessage.success(wdia,"查询成功");
    }

    //订单明细
    @PostMapping("/queryDdmx/{sjid}")
    public ResultMessage queryDdmx(@PathVariable Integer sjid) {
        Ddmx ddmx = workService.queryDdmx(sjid);
        return ResultMessage.success(ddmx,"查询成功");
    }
}
